#pragma once
#include <omp.h>

#include "Graph.h"


class Solution {

public:

	explicit Solution(std::vector<std::string> words);

	// if has circle return true
	bool checkCircle();

    //-n
    int genAllChain(std::vector<std::string> &result);

    //-w -h [head] -t [tail] -r no -h than head=='\0' no -t than tail=='\0'
    int genMaxWordChain(std::vector<std::string> &result,char head,char tail,bool allowCircle);

    //-m
    int genMaxWordChainNotSame(std::vector<std::string> &result);

    //-c -h [head] -t [tail] -r
    int genMaxCharChain(std::vector<std::string> &result,char head,char tail,bool allowCircle);




private:
    Graph graph;

};